<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="mm_lodging1.css" type="text/css" />
    <title>Create Marker</title>

<style type="text/css">
	<!--
	body {
		background-color: #0099CC;
	}
	.style2 {font-family: Arial, Helvetica, sans-serif}
	.style3 {
		font-family: Verdana, Arial, Helvetica, sans-serif;
		color: #000000;
		font-weight: bold;
	}
	.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
	-->
</style>
</head>

<body>
    <h1 align="center" class="pageName style3">
    	<strong>Marker Created</strong><img src="Imagenes/login2.png" width="32" height="28" />
    </h1>

<?php
	$idm= $_POST["id"];
	$coordx= $_POST["coordx"];
	$coordy= $_POST["coordy"];
	$name= $_POST["name"];
	$address= $_POST["adress"];
	$type= $_POST["type"];
	$moreinfo= $_POST["moreinfo"];

	include "Global.php";
	//Conexion a mysql y a la base de datos
	$connection = DBConnect();

	//Crea un nuevo tour con un nombre y una descripcion
	$query="insert into places (coordx , coordy , name , adress , type , moreinfo) values ('$coordx', '$coordy', '$name', '$address', '$type', '$moreinfo')"; 
	$resultado = mysql_query($query) or die ('\n error en query ' . mysql_error());
	
	//Obtiene el id de el recien creado tour
	$query1="select IDplaces from places where name='$name'"; 
	$resultado1 = mysql_query($query1) or die ('\n error en query ' . mysql_error());
	$row1 = mysql_fetch_assoc($resultado1);
	$idm=$row1['IDplaces'];
	
	DBCLose($connection);
?>	
	
    <form id="form1" name="form1" action="createMarker.php" target="mainFrame">
    <div align="center">
        <br />
        <input name="View" type="submit" value="Ok" class="subHeader" />
    </div>
    </form>
   

</body>
</html>
